package com.party.core.model.photo;

import com.party.core.model.BaseModel;

import java.util.Date;

/**
 * @Description: 相册照片
 * @Author: yangshoukun
 * @Date: 2018/5/29 17:55
 */
public class PhotosImgInfo extends BaseModel {

    public static final Integer CAN_DEL = 1;

    public static final Integer CAN_NOT_DEL = 0;

    private static final long serialVersionUID = 2636211587426345029L;
    // 相册项目id
    private String photosId;
    // file_img_res表的id
    private String imgResourceId;
    // 照片路径
    private String url;
    // 浏览量
    private Integer viewNum;
    // 操作次数
    private Integer operateNum;
    // 拍摄时间
    private Date takeTime;
    // 是否可以从万象有图删除图片
    private Integer canDel;
    // 是否有分类
    private Integer hasTag;
    // 最后更新时间
    private Date lastTime;
    // 最后更新人
    private String lastMember;
    // 操作
    private String operateId;
    // 分类
    private String tagName;
    // 累计贡献
    private Integer memberOperateNum;

    public Integer getHasTag() {
        return hasTag;
    }

    public void setHasTag(Integer hasTag) {
        this.hasTag = hasTag;
    }

    public String getPhotosId() {
        return photosId;
    }

    public void setPhotosId(String photosId) {
        this.photosId = photosId;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Integer getViewNum() {
        return viewNum;
    }

    public void setViewNum(Integer viewNum) {
        this.viewNum = viewNum;
    }

    public Integer getOperateNum() {
        return operateNum;
    }

    public void setOperateNum(Integer operateNum) {
        this.operateNum = operateNum;
    }

    public Date getTakeTime() {
        return takeTime;
    }

    public void setTakeTime(Date takeTime) {
        this.takeTime = takeTime;
    }

    public String getImgResourceId() {
        return imgResourceId;
    }

    public void setImgResourceId(String imgResourceId) {
        this.imgResourceId = imgResourceId;
    }

    public Integer getCanDel() {
        return canDel;
    }

    public void setCanDel(Integer canDel) {
        this.canDel = canDel;
    }

    public Date getLastTime() {
        return lastTime;
    }

    public void setLastTime(Date lastTime) {
        this.lastTime = lastTime;
    }

    public String getLastMember() {
        return lastMember;
    }

    public void setLastMember(String lastMember) {
        this.lastMember = lastMember;
    }

    public String getOperateId() {
        return operateId;
    }

    public void setOperateId(String operateId) {
        this.operateId = operateId;
    }

    public String getTagName() {
        return tagName;
    }

    public void setTagName(String tagName) {
        this.tagName = tagName;
    }

    public Integer getMemberOperateNum() {
        return memberOperateNum;
    }

    public void setMemberOperateNum(Integer memberOperateNum) {
        this.memberOperateNum = memberOperateNum;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof PhotosImgInfo)) return false;
        if (!super.equals(o)) return false;

        PhotosImgInfo that = (PhotosImgInfo) o;

        if (photosId != null ? !photosId.equals(that.photosId) : that.photosId != null) return false;
        if (imgResourceId != null ? !imgResourceId.equals(that.imgResourceId) : that.imgResourceId != null)
            return false;
        if (url != null ? !url.equals(that.url) : that.url != null) return false;
        if (viewNum != null ? !viewNum.equals(that.viewNum) : that.viewNum != null) return false;
        if (operateNum != null ? !operateNum.equals(that.operateNum) : that.operateNum != null) return false;
        if (takeTime != null ? !takeTime.equals(that.takeTime) : that.takeTime != null) return false;
        return canDel != null ? canDel.equals(that.canDel) : that.canDel == null;
    }

    @Override
    public int hashCode() {
        int result = super.hashCode();
        result = 31 * result + (photosId != null ? photosId.hashCode() : 0);
        result = 31 * result + (imgResourceId != null ? imgResourceId.hashCode() : 0);
        result = 31 * result + (url != null ? url.hashCode() : 0);
        result = 31 * result + (viewNum != null ? viewNum.hashCode() : 0);
        result = 31 * result + (operateNum != null ? operateNum.hashCode() : 0);
        result = 31 * result + (takeTime != null ? takeTime.hashCode() : 0);
        result = 31 * result + (canDel != null ? canDel.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "PhotosImgInfo{" +
                "photosId='" + photosId + '\'' +
                ", imgResourceId='" + imgResourceId + '\'' +
                ", url='" + url + '\'' +
                ", viewNum=" + viewNum +
                ", operateNum=" + operateNum +
                ", takeTime=" + takeTime +
                ", canDel=" + canDel +
                '}';
    }
}
